import request from '@/utils/request'

// 获取书籍列表
export const getBookList = (page, pageSize, keyword) => {
  return request.get('/book/page', {
    params: {
      page,
      pageSize,
      keyword
    }
  })
}

// 新增书籍
export const insertBook = (data) => {
  return request.post('/book/insert', data)
}

// 根据id获取书籍详情
export const getBookById = (id) => {
  return request.get(`/book/getDetailById/${id}`)
}

// 更新书籍
export const updateBook = (data) => {
  return request.put('/book/update', data)
}
